package procsim;

public class PaintMEM1 extends PaintTab{
    public PaintMEM1 (Paint parent){
        super(parent);
        // Coordinates
        Design.DBUS.addCoords(this, 10, 15, 790, 15);
        Design.ABUS.addCoords(this, 10, 45, 790, 45);
        Design.WRBUS.addCoords(this, 10, 80, 300, 80);
        Design.RDBUS.addCoords(this, 10, 100, 300, 100);
        Design.FC.addCoords(this, Design.MRS1.getRCoords(30));
        Design.FC.addCoords(this, Design.MRS2.getRCoords(30));
        Design.FC.addCoords(this, Design.DR.getLdCoords(30));
        Design.DFC.addCoords(this, Design.MTriState3.getCtrlCoords(20));
        Design.DOut.addCoords(this, 575, 251, 575, 300);
        Design.MOr2Out.addCoords(this, Design.MOr2.getResCoords(70));
        Design.MOr2Out.addCoords(this, 447, 177, 447, 140);
        Design.MOr2Out.addCoords(this, 447, 140, 500, 140);
        Design.MOr3Out.addCoords(this, Design.MOr3.getResCoords(70));
        Design.MOr3Out.addCoords(this, 447, 297, 447, 210);
        Design.MOr3Out.addCoords(this, 447, 210, 500, 210);
        Design.FWR.addCoords(this, Design.MRS1.getQCoords(43));
        Design.FRD.addCoords(this, Design.MRS2.getQCoords(43));
        Design.MWRBusOut.addCoords(this, Design.MTriState2.getInCoords(50));
        Design.MRDBusOut.addCoords(this, Design.MTriState1.getInCoords(30));
        Design.MABusOut.addCoords(this, 460, 176, 500, 176);
        Design.MABusOut.addCoords(this, 460, 47, 460, 176);
        Design.MDBusOut.addCoords(this, 575, 17, 575, 100);
        Design.MTriState3Out.addCoords(this, Design.MTriState3.getResCoords(103));
        Design.DROut.addCoords(this, Design.DR.getOutCoords(50));
        Design.DROut.addCoords(this, Design.MTriState3.getInCoords(50));
        Design.DROut.addCoords(this, 575, 410, 732, 410);
        Design.DROut.addCoords(this, 732, 200, 732, 410);
        Design.ldCNT.addCoords(this, Design.MOr1.getResCoords(30).verticalFlip());
        Design.MTriState1out.addCoords(this, Design.MTriState1.getResCoords(141));
        Design.MTriState1out.addCoords(this, Design.MRS2.getSCoords(138));
        Design.MTriState1out.addCoords(this, 225, 305, 225, 277);
        Design.MTriState1out.addCoords(this, 225, 277, 337, 277);
        Design.MTriState1out.addCoords(this, 337, 277, 337, 290);
        Design.MTriState1out.addCoords(this, 337, 290, 353, 290);
        Design.MTriState1out.addCoords(this, Design.MOr1.getLower2Coords(19));
        Design.MTriState1out.addCoords(this, 35, 231, 112, 231);

        Design.MTriState2out.addCoords(this, Design.MTriState2.getResCoords(21));
        Design.MTriState2out.addCoords(this, Design.MRS1.getSCoords(58));
        Design.MTriState2out.addCoords(this, 225, 185, 225, 157);
        Design.MTriState2out.addCoords(this, 225, 157, 337, 157);
        Design.MTriState2out.addCoords(this, 337, 157, 337, 170);
        Design.MTriState2out.addCoords(this, 337, 170, 353, 170);
        Design.MTriState2out.addCoords(this, Design.MOr1.getUpper2Coords(65));
        Design.MTriState2out.addCoords(this, 50, 185, 225, 185);

        // Collections
        elements.add(Design.memory);
        elements.add(Design.MOr1);
        elements.add(Design.MOr2);
        elements.add(Design.MOr3);
        elements.add(Design.MTriState1);
        elements.add(Design.MTriState2);
        elements.add(Design.MTriState3);
        elements.add(Design.MRS1);
        elements.add(Design.MRS2);
        elements.add(Design.DR);
        
        lines.add(Design.MABusOut);
        lines.add(Design.MDBusOut);
        lines.add(Design.MRDBusOut);
        lines.add(Design.MWRBusOut);
        lines.add(Design.MTriState3Out);
        lines.add(Design.DOut);
        lines.add(Design.DROut);
        lines.add(Design.MTriState2out);
        lines.add(Design.MTriState1out);
        lines.add(Design.ldCNT);
        lines.add(Design.MOr2Out);
        lines.add(Design.MOr3Out);
        lines.add(Design.FRD);
        lines.add(Design.FWR);
        lines.add(Design.FC);
        lines.add(Design.DFC);
        lines.add(Design.ABUS);
        lines.add(Design.DBUS);
        lines.add(Design.RDBUS);
        lines.add(Design.WRBUS);
    }
}
